package com.xju.travelmanager.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName xj_cost
 */
@TableName(value ="xj_cost")
@Data
public class Cost implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    private Integer pathId;

    /**
     * 
     */
    private Double hotelprice;

    /**
     * 
     */
    private Double toll;

    /**
     * 
     */
    private Double mealprice;

    /**
     * 
     */
    private Double discount;

    /**
     * 
     */
    private Double totalprice;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Cost other = (Cost) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPathId() == null ? other.getPathId() == null : this.getPathId().equals(other.getPathId()))
            && (this.getHotelprice() == null ? other.getHotelprice() == null : this.getHotelprice().equals(other.getHotelprice()))
            && (this.getToll() == null ? other.getToll() == null : this.getToll().equals(other.getToll()))
            && (this.getMealprice() == null ? other.getMealprice() == null : this.getMealprice().equals(other.getMealprice()))
            && (this.getDiscount() == null ? other.getDiscount() == null : this.getDiscount().equals(other.getDiscount()))
            && (this.getTotalprice() == null ? other.getTotalprice() == null : this.getTotalprice().equals(other.getTotalprice()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPathId() == null) ? 0 : getPathId().hashCode());
        result = prime * result + ((getHotelprice() == null) ? 0 : getHotelprice().hashCode());
        result = prime * result + ((getToll() == null) ? 0 : getToll().hashCode());
        result = prime * result + ((getMealprice() == null) ? 0 : getMealprice().hashCode());
        result = prime * result + ((getDiscount() == null) ? 0 : getDiscount().hashCode());
        result = prime * result + ((getTotalprice() == null) ? 0 : getTotalprice().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", pathId=").append(pathId);
        sb.append(", hotelprice=").append(hotelprice);
        sb.append(", toll=").append(toll);
        sb.append(", mealprice=").append(mealprice);
        sb.append(", discount=").append(discount);
        sb.append(", totalprice=").append(totalprice);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}